package com.ikun.hosuserservice.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ikun.common.entity.User;
import com.ikun.hosuserservice.mapper.UserMapper;
import com.ikun.hosuserservice.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.Date;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Autowired
    UserMapper userMapper;

    @Override
    public void register(User user) {
        user.setCreateTime(new Date());
        userMapper.insert(user);
    }
}